<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
    <div class="layui-card-body">
<!--         <div class="layui-form-item">
            <label class="layui-form-label label-required">访客姓名</label>
            <div class="layui-input-block">
                <input name="visit_name" value='{$vo.visit_name|default=""}' required placeholder="请输入公司员工姓名" class="layui-input">
            </div>
        </div> -->
        <!--<div class="layui-form-item">-->
        <!--    <label class="layui-form-label label-required">访客身份</label>-->
        <!--    <div class="layui-input-block">-->
        <!--        <input name="user_type" value='{$vo.user_type|default=""}' required placeholder="请输入公司员工身份" class="layui-input">-->
        <!--    </div>-->
        <!--</div>-->
		<div class="layui-form-item">
		    <label class="layui-form-label label-required">拜访目的</label>
		    <div class="layui-input-block">
		        <input name="reson" value='{$vo.reson|default=""}' required placeholder="请输入拜访目的" class="layui-input">
		    </div>
		</div>
		<div class="layui-form-item">
		    <label class="layui-form-label label-required">拜访部门</label>
		    <div class="layui-input-block">
		        <!--<input name="address" value='{$vo.address|default=""}' required placeholder="请输入拜访部门" class="layui-input">-->
		            <select  class="layui-select" name="address" >
                <option value="">-- 选择拜访部门 --</option>

                    {foreach  $data['deptment'] as $key=>$value}
                         {if($value.id == @$vo.id )}
                    
                        <option selected value="{$value.id}">{$value.name}</option>
                        {else}
                        <option value="{$value.id}">{$value.name}</option>
                        {/if}
                    {/foreach}
                </select>
		    </div>
		</div>
		<div class="layui-form-item">
		    <label class="layui-form-label label-required">接见员工</label>
		    <div class="layui-input-block">
		        <!--<input name="user_name" value='{$vo.user_name|default=""}' required placeholder="请输入邀请员工" class="layui-input">-->
		        
		         <select  class="layui-select" name="user_name" >
                <option value="">-- 选择接见员工 --</option>

                    {foreach  $data['user'] as $key=>$value}
                         {if($value.id == @$vo.id )}
                    
                        <option selected value="{$value.id}">{$value.name}</option>
                        {else}
                        <option value="{$value.id}">{$value.name}</option>
                        {/if}
                    {/foreach}
                </select>
		    </div>
		    
		</div>
			<div class="layui-form-item">
		    <label class="layui-form-label label-required">拜访公司</label>
		    <div class="layui-input-block">
		    <!--    <input name="address" value='{$vo.address|default=""}' required placeholder="请输入拜访地址" class="layui-input">-->
		    <!--</div>-->
		     <select  class="layui-select" name="companyid" >
                <option value="">-- 选择公司 --</option>

                    {foreach  $data['appointment'] as $key=>$value}
                         {if($value.id == @$vo.id )}
                    
                        <option selected value="{$value.id}">{$value.name}</option>
                        {else}
                        <option value="{$value.id}">{$value.name}</option>
                        {/if}
                    {/foreach}
                </select>
		</div>
    </div>
        <div class="layui-form-item nowrap">
            <div class="layui-form-item">
            <label class="layui-form-label">预约日期</label>
            <div class="layui-input-inline">
                <input type="text" data-date-input="date" name="entry_date" value='{$vo.entry_date|default=""}' placeholder="请输入预约日期" class="layui-input">
            </div>
        </div>
            <!--<label class="layui-form-label" style="width:auto">到访日期</label>-->
            <!--<div class="layui-input-inline margin-right-0" style="width:164px">-->
            <!--    <input type="text" data-date-input="date" name="become_date" value='{$vo.become_date|default=""}' placeholder="请输入转正日期" class="layui-input">-->
            <!--</div>-->

        <div class="layui-form-item">
<!--             <label class="layui-form-label">联系ＱＱ</label>
            <div class="layui-input-inline margin-right-0" style="width:164px">
                <input type="tel" autocomplete="off" name="contact_qq" value='{$vo.contact_qq|default=""}' pattern="^\d{6,}$" placeholder="请输入联系ＱＱ号码" class="layui-input">
            </div> -->
            <label class="layui-form-label" >联系手机</label>
            <div class="layui-input-inline">
                <input type="tel" maxlength="11" autocomplete="off" name="contact_phone" value='{$vo.contact_phone|default=""}' pattern="^1[3-9][0-9]{9}$" placeholder="请输入联系手机" class="layui-input">
            </div>
<!--             <label class="layui-form-label" style="width:auto">联系邮箱</label>
            <div class="layui-input-inline margin-right-0" style="width:164px">
                <input name="contact_mail" autocomplete="off" pattern="^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$" value='{$vo.contact_mail|default=""}' placeholder="请输入联系邮箱" class="layui-input">
            </div> -->
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入备注" class="layui-textarea" name="mobile_macs">{$vo.mobile_macs|default=""}</textarea>
            </div>
        </div>
    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>

    <script>window.form.render();</script>

</form>
